package work;

public class Student {
	
	private int studentNumber;
	private int classNumber;
	private String name;
	private int age;
	private char sex;
	
	public Student(){
		
	}

	public int getStudentNumber() {
		return studentNumber;
	}

	public void setStudentNumber(int studentNumber) {
		this.studentNumber = studentNumber;
	}

	public int getClassNumber() {
		return classNumber;
	}

	public void setClassNumber(int classNumber) {
		this.classNumber = classNumber;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		if(age > 1 || age < 100){
			this.age = age;
		}else{
			System.out.println("输入错误，请重新输入");
		}
	}

	public char getSex() {
		return sex;
	}

	public void setSex(char sex) {
		if(sex == '女' || sex == '男'){
			this.sex = sex;
		}else{
			System.out.println("输入错误，请重新输入");
		}
	}
	
	
	
	
	
	
}
